<template>
  <div id="plannedInventory">
    <plannedInventoryDetails
      v-if="key == 2"
      class="plannedInventoryDetails"
      :getKey="getKey"
      :dailyId="dailyId"
    ></plannedInventoryDetails>

    <plannedInventoryTable
      class="plannedInventoryTable"
      v-if="key == 1"
      :dailyId="dailyId"
      :getKey="getKey"
      style="margin: 0 auto; width: 95%"
    ></plannedInventoryTable>
  </div>
</template>

<script>
// 日计划
import plannedInventoryDetails from './plannedInventoryDetails.vue'
// 周计划
import plannedInventoryTable from './plannedInventoryTable.vue'

export default {
  data() {
    return {
      key: 1,
      dailyId: '',
    }
  },
  components: {
    plannedInventoryDetails,
    plannedInventoryTable,
    // plannedInventoryDetails,
  },
  created() {},
  methods: {
    getKey(key, dailyId) {
      this.key = key
      this.dailyId = dailyId
    },
  },
}
</script>

<style lang="less" scoped>
#plannedInventory {
  height: 100%;
  width: 100%;

  .plannedInventoryTable {
    width: 100%;
  }
  .plannedInventoryFrom {
    width: 100%;
  }
}
.el-menu-vertical-plannedInventory {
  width: 18rem;
  height: 61rem;
}
.constructionPlanContent {
  width: 100%;
  position: relative;
}
</style>
